﻿@page "/login"
@layout EmptyLayout
@inherits LoginPage

<div class="login">
    <div class="login-head">
        <div class="login-logo">
            <a class="kui-logo" href="@Config.SiteUrl" target="_blank" style="position:initial;height:55px;"></a>
            <div>@Language["App.SubTitle"]</div>
        </div>
        @* <TopRightMenu>
            <li><a href="@Config.SiteUrl/doc" target="_blank">@Language["Document"]</a></li>
        </TopRightMenu> *@
    </div>
    <div class="login-body" style="background-image:url(img/login.jpg);">
        <div class="login-left">
            <ul>
                <li>@Language["OpenSource"]</li>
                <li>@Language["LowCode"]</li>
                <li>@Language["ModernUI"]</li>
            </ul>
            <img src="img/login.png" />
        </div>
        <div class="login-form">
            <div class="login-form-body">
                <LoginForm Model="Model" OnLogin="OnUserLogin" OnSendSMS="OnSendSMS" />
            </div>
        </div>
    </div>
    <div class="login-copyright"><PageFooter /></div>
</div>

@code {
    protected override async Task OnInitAsync()
    {
        await base.OnInitAsync();
        Model.UserName = "Admin";
        Model.Password = "888888";
    }

    private Task<Known.Result> OnSendSMS(string phone)
    {
        return Known.Result.SuccessAsync($"Send to {phone}");
    }
}